<?php

namespace pos\services\user;

use pos\extensions\ApiBaseService;
use pos\models\user\User;
use pos\services\wechat\MiniProgramService;
use common\services\cache\CommonCache;

/**
 * Desc 会员服务类
 * @author WMX
 */
class UserService extends ApiBaseService
{

    /**
     * 会员登录
     * * */
    public static function register($params)
    {
        try {
            
            $user = User::register($params['phone']);
            if (empty($user)) {
                throw new \Exception('会员注册异常');
            }
            return $user;
        } catch (\Exception $exc) {
            return [];
        }
    }

}
